import {
  get
} from './http'

const api = (function () {

  // 获取美图外卖分类列表
  const getCategory = function (data) {
   let url = '/getCategory'
   return get(url, data)
  }

  // 首页推荐列表
  const getContentList = function(data) {
    let url = '/getContentList'
    return get(url, data)
  }

  // 首页订单列表
  const getOrderList = function(data) {
    let url = '/getOrderList'
    return get(url, data)
  }

  // 首页筛选数据
  const getFilterData = function(data) {
      let url = '/getFilterData'
      return get(url, data)
  }

  // 获取筛选后的数据
  const getFilterContentList = function(data) {
      let url = '/getFilterContentList'
      return get(url, data)
  }

  // 获取菜单数据
    const getMenuList = function(data) {
        let url = '/getMenuList'
        return get(url, data)
    }


  return {
      getMenuList,
    getFilterContentList,
    getCategory,
    getContentList,
    getOrderList,
    getFilterData
  }
})()

export default api
